package com.systemic.mapper;

import com.systemic.pojo.MindfulnessClass;
import com.systemic.pojo.MindfulnessMedia;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: MindfulnessMediaMapper
 * @Description:
 * @Author:
 * @CreateTime: 2024-01-26 08:14
 * @Version:
 **/
@Mapper
public interface MindfulnessMediaMapper extends BaseMapper<MindfulnessMedia>{

    MindfulnessMedia selectById(@Param("id") Integer id);

    /**
     * 根据正念名称模糊查询
     * @param mediaName
     * @param offset
     * @param pageSize
     * @return
     */
    List<MindfulnessMedia> likeSelectPage(@Param("mediaName") String mediaName,
                                          @Param("offset") Integer offset,
                                          @Param("pageSize") Integer pageSize);

    /**
     * 查询用户上传的正念媒体
     * @param author
     * @param offset
     * @param pageSize
     * @return
     */
    List<MindfulnessMedia> selectByAuthor(@Param("author") Integer author,
                                          @Param("offset") Integer offset,
                                          @Param("pageSize") Integer pageSize);

    /**
     * 查询(分页，管理端)
     * @param offset
     * @param pageSize
     * @return
     */
    List<MindfulnessMedia> likeSelectList(@Param("offset") Integer offset,
                                          @Param("pageSize") Integer pageSize);
}
